Documentation > CMS Template API Library > InputForm > SaveContent(Dictionary[String,String])
SaveContent
Adds or edits form fields defined in the given dictionary. These fields will be committed after the post_input template file runs.
public System.Void SaveContent(Dictionary[String,String])
Parameters
| Name | Description | Type |
|---|---|---|
| fields | The dictionary of fields to save. | Dictionary<String,String> |
Code Example
C#
Sample:
Asset configAsset = Asset.Load(asset.Parent.AssetPath.ToString() + "/config");
if(configAsset.IsLoaded)
{
Dictionary<string, string> fields = new Dictionary<string, string>();
fields.Add("config_title", configAsset["title"]);
fields.Add("config_description"l, configAsset["description"]);
context.InputForm.SaveContent(fields);
}